********************************
**PLOTS SUPPLEMENTARY MATERIAL**
********************************
*****************************************************
* Mexico Pollfish Survey            				*
* E1 Survey Experiment      				        *
* Ana López García, Sarah Berens & Barry Maydom 	*
* July 2023                                         *
* 		                            				*
* PLOTS - SM	                                    *
* Pollfish Mexico Survey Dec 31-Jan2nd 21/22        *
*****************************************************
*CHECK - Set directory

use "Data/Data ready E1.dta", clear 

cd "Results/Plots E1/"

***************************************************************************
*Plots - SM
***Figure A1. Distribution of the DV: Willingness to pay higher taxes
***Figure A2: Willingness to pay higher taxes by tax instruments and policy earmarking
***Figure A3. Willingness to pay higher taxes by migrant status
***Figure A4. Willingness to pay higher taxes by remittance receipt 
***Figure A5. Willingness to pay higher taxes by US states withMedicaid expansion 


**************************************************************************
*Plot style
grstyle init 
grstyle set plain, nogrid
grstyle set color mono
grstyle set legend, nobox
 
graph drop _all
 
**********************************************************************
***Figure A1. Distribution of the DV: Willingness to pay higher taxes

catplot E1_pay_taxes, percent recast(bar) ytitle("Respondents (%)", margin(small) size(medsmall)) var1opts(label(labsize(medsmall)) ///
	relabel(1"Strongly disagree" 2"Disagree" 3"Neither" 4"Agree" 5"Strongly agree")) title("") b1title("") scale(0.9)
graph save "FigureA1_SM_DV.gph", replace
graph export "FigureA1_SM_DV.wmf", as(wmf) replace

**********************************************************************
***Figure A2: Willingness to pay higher taxes by tax instruments and policy earmarking

*Plotting tax instrument  
anova E1_pay_taxes i.E1_vign1##i.E1_vign2
margins g.E1_vign1, contrast(nowald pveffects) post
marginsplot, name(vign1) x(E1_vign1)  plotregion(margin(vlarge)) yline(0, lcolor(black) lpat(shortdash)) ///
	recast(scatter)  recastci(rspike)  graphregion(color(white)) title("") xlabel(0 "None" 1 "VAT" 2 "Income") ///
	plot1opts(msymbol(oh)) ytitle("Deviation from grand mean", size(small) margin(small)) ///
	xtitle("Tax instruments", margin(large) size(medium)) 

*Plotting tax earmarking  
anova E1_pay_taxes i.E1_vign1##i.E1_vign2
margins g.E1_vign2, contrast(nowald pveffects) post
marginsplot, name(vign2) x(E1_vign2)  plotregion(margin(vlarge)) yline(0, lcolor(black) lpat(shortdash)) ///
	recast(scatter)  recastci(rspike)  graphregion(color(white)) title("") ///
	xlabel(0 "None" 1 "Health" 2 "Roads" 3 "Security") plot1opts(msymbol(oh)) ///
	ytitle("Deviation from grand mean", size(small) margin(small)) ///
	xtitle("Tax earmarking", margin(large) size(medium)) 

grc1leg2 vign1 vign2, cols(2) ycommon ytol1title scale(0.85) loff  title("", margin(small) size(large))
graph save "FigureA2_SM_DV.gph", replace 
graph export "FigureA2_SM_DV.wmf", as(wmf) replace

***************************************************************
***Figure A3. Willingness to pay higher taxes by migrant status

*Non-migrant VS Migrants 
grstyle init 
grstyle set plain, nogrid
grstyle set color mono
grstyle set legend, nobox
grstyle set graphsize 4 6 

*Plotting Main Effects
*Plots - tax instruments
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.migrant
margins g.E1_vign1@migrant, contrast(nowald pveffects) asobserved
marginsplot, x(E1_vign1) xtitle("") plotregion(margin(vlarge)) yline(0, lcolor(black) lpat(shortdash)) ///
	byopt(title("") compact rows(1)) by(migrant, label ("Non-migrant HH" "Migrant HH")) ///
	recast(scatter)  recastci(rspike)  graphregion(color(white)) ///
	xlabel(0 "Generic" 1 "VAT" 2 "Income", labsize(small)) ///
	plot1opts(msymbol(oh)) ytitle("") scale(0.8)
graph save "Migrant_Instruments.gph", replace 

*Plots - tax earmarking 
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.migrant
margins g.E1_vign2@migrant, contrast(nowald pveffects) asobserved
marginsplot, x(E1_vign2) xtitle("") plotregion(margin(vlarge)) yline(0, lcolor(black) lpat(shortdash)) ///
	byopt(title("") compact rows(1)) by(migrant, label ("Non-migrant HH" "Migrant HH")) ///
	recast(scatter)  recastci(rspike)  graphregion(color(white)) ///
	xlabel(0 "Generic" 1 "Health" 2 "Roads" 3 "Security", labsize(small)) ///
	plot1opts(msymbol(oh)) ytitle("") scale(0.8)
graph save "Migrant_Earmarking.gph", replace 

**COMBINING GRAPHS 
grstyle set graphsize 5.45 6 
graph combine "Migrant_Instruments.gph" "Migrant_Earmarking.gph", l1("Deviation from grand mean", size("vsmall")) ycommon cols(1) scale(0.9)
graph save "FigureA3_SM.gph", replace 
graph export "FigureA3_SM.wmf", as(wmf) replace

***********************************************************************
***Figure A4. Willingness to pay higher taxes by remittance receipt 

grstyle init 
grstyle set plain, nogrid
grstyle set color mono
grstyle set legend, nobox

*REMITTANCES 

*Plots - tax instruments
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.remittances2
margins g.E1_vign1@remittances2, contrast(nowald pveffects) asobserved
marginsplot, x(E1_vign1) plotregion(margin(vlarge)) yline(0, lcolor(black) lpat(shortdash)) ///
	byopt(title("") compact rows(1)) by(remittances2, label ("Non-migrant HH" "Remittance-receiving HH" "Non-recipient HH")) ///
	recast(scatter)  recastci(rspike)  graphregion(color(white)) xlabel(0 "Generic" 1 "VAT" 2 "Income", labsize(small)) ///
	plot1opts(msymbol(oh)) ytitle("") xtitle("") scale(0.80)
graph save "Remittances_Instruments.gph", replace 

*Plots - tax earmarking 
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.remittances2
margins g.E1_vign2@remittances2, contrast(nowald pveffects) asobserved
marginsplot, x(E1_vign2) plotregion(margin(vlarge)) yline(0, lcolor(black) lpat(shortdash)) ///
	byopt(title("") compact rows(1)) by(remittances2, label ("Non-migrant HH" "Remittance-receiving HH" "Non-recipient HH")) ///
	recast(scatter)  recastci(rspike)  graphregion(color(white)) xlabel(0 "Generic" 1 "Health" 2 "Roads" 3 "Security", labsize(small)) ///
	plot1opts(msymbol(oh)) ytitle("") xtitle("") scale(0.80)
graph save "Remittances_Earmarking.gph", replace 

grstyle set graphsize 5.45 6 

graph combine "Remittances_Instruments.gph" "Remittances_Earmarking.gph", l1("Deviation from grand mean", size("vsmall")) ///
	ycommon cols(1) scale(0.9)
graph save "FigureA4_SM.gph", replace 
graph export "FigureA4_SM.wmf", as(wmf) replace



********************************************************************************
***Figure A5. Willingness to pay higher taxes by US states withMedicaid expansion 
grstyle init 
grstyle set plain, nogrid
grstyle set color mono
grstyle set legend, nobox

*OBAMACARE

*Plots - tax instruments
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.obamacare
margins g.E1_vign1@obamacare, contrast(nowald pveffects) asobserved
marginsplot, x(E1_vign1) plotregion(margin(vlarge)) yline(0, lcolor(black) lpat(shortdash)) byopt(title("") ///
	compact rows(1)) by(obamacare, label ("Non-migrant HH" "States refusing coverage" "States expanding coverage")) ///
		recast(scatter)  recastci(rspike)  graphregion(color(white)) ///
		xlabel(0 "Generic" 1 "VAT" 2 "Income", labsize(small)) ///
		plot1opts(msymbol(oh)) ytitle("") xtitle("") scale(0.80)
graph save "Obamacare_Instruments.gph", replace 

*Plots - tax earmarking 
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.obamacare 
margins g.E1_vign2@obamacare, contrast(nowald pveffects) asobserved
marginsplot, x(E1_vign2) plotregion(margin(vlarge)) yline(0, lcolor(black) lpat(shortdash)) byopt(title("") ///
	compact rows(1)) by(obamacare, label ("Non-migrant HH" "States refusing coverage" "States expanding coverage")) ///
		recast(scatter)  recastci(rspike)  graphregion(color(white)) ///
		xlabel(0 "Generic" 1 "Health" 2 "Roads" 3 "Security", labsize(small)) ///
		plot1opts(msymbol(oh)) ytitle("") xtitle("") scale(0.80)
graph save "Obamacare_Earmarking.gph", replace 

grstyle set graphsize 5.45 6 
graph combine "Obamacare_Instruments.gph" "Obamacare_Earmarking.gph", l1("Deviation from grand mean", size("vsmall")) ///
	ycommon cols(1) scale(0.9)
graph save "FigureA5_SM.gph", replace 
graph export "FigureA5_SM.wmf", as(wmf) replace

*********************************************************************************
***Figure A6. Willingness to pay higher taxes by US states withE-Verify mandates 
grstyle init 
grstyle set plain, nogrid
grstyle set color mono
grstyle set legend, nobox

*EVERIFY

*Plots - tax instruments
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.everify
margins g.E1_vign1@everify, contrast(nowald pveffects) asobserved
marginsplot, x(E1_vign1) plotregion(margin(vlarge)) yline(0, lcolor(black) lpat(shortdash)) byopt(title("") ///
	compact rows(1)) by(everify, label ("Non-migrant" "Mandatory to all employers" "Mandatory to public employers only" "Nonmandatory")) ///
	recast(scatter)  recastci(rspike)  graphregion(color(white)) ///
	xlabel(0 "Generic" 1 "VAT" 2 "Income", labsize(small)) ///
	plot1opts(msymbol(oh)) ytitle("") xtitle("") scale(0.70)
graph save "Everify_instruments.gph", replace 

*Plots - tax earmarking 
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.everify
margins g.E1_vign2@everify, contrast(nowald pveffects) asobserved
marginsplot, x(E1_vign2) plotregion(margin(vlarge)) yline(0, lcolor(black) lpat(shortdash)) byopt(title("") ///
	compact rows(1)) by(everify, label ("Non-migrant" "Mandatory to all employers" "Mandatory to public employers only" "Nonmandatory")) ///
	recast(scatter)  recastci(rspike)  graphregion(color(white)) ///
	xlabel(0 "Generic" 1 "Health" 2 "Roads" 3 "Security", labsize(small)) ///
	plot1opts(msymbol(oh)) ytitle("") xtitle("") scale(0.70)
graph save "Everify_Earmarking.gph", replace 

grstyle set graphsize 5.45 6  

graph combine "Everify_Instruments.gph" "Everify_Earmarking.gph", l1("Deviation from grand mean", size("vsmall")) ycommon cols(1) scale(0.9)
graph save "FigureA6_SM.gph", replace 
graph export "FigureA6_SM.wmf", as(wmf) replace 

**********************************************************************************
***Figure A7. Willingness to pay higher taxes by US states with no/flat rate vs. progressive tax structure
grstyle init 
grstyle set plain, nogrid
grstyle set color mono
grstyle set legend, nobox

*TAX STRUCTURE

*Plots - tax instruments
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.tax_us2
margins g.E1_vign1@tax_us2, contrast(nowald pveffects) asobserved
marginsplot, x(E1_vign1) plotregion(margin(vlarge)) yline(0, lcolor(black) lpat(shortdash)) byopt(title("") compact rows(1)) ///
	by(tax_us2, label ("Non-migrant HH"  "No/Flat rates" "Progressive rates"))  recast(scatter)  recastci(rspike)  ///
	graphregion(color(white)) xlabel(0 "Generic" 1 "VAT" 2 "Income", labsize(small)) plot1opts(msymbol(oh)) ///
	ytitle("") xtitle("") scale(0.70)
graph save "Tax_structure_instruments.gph", replace 

*Plots - tax earmarking 
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.tax_us2 
margins g.E1_vign2@tax_us2, contrast(nowald pveffects) asobserved
marginsplot, x(E1_vign2) plotregion(margin(vlarge)) yline(0, lcolor(black) lpat(shortdash)) byopt(title("") ///
	compact rows(1)) by(tax_us2, label ("Non-migrant HH" "No/Flat rates" "Progressive rates")) recast(scatter) ///
	recastci(rspike)  graphregion(color(white)) xlabel(0 "Generic" 1 "Health" 2 "Roads" 3 "Security", labsize(small)) ///
	plot1opts(msymbol(oh)) ytitle("") xtitle("") scale(0.70)
graph save "Tax_structure_Earmarking.gph", replace 

grstyle set graphsize 5.45 6 

graph combine "Tax_structure_Instruments.gph" "Tax_structure_Earmarking.gph", l1("Deviation from grand mean", size("vsmall")) ///
	ycommon cols(1) scale(0.9)
graph save "FigureA7_SM.gph", replace 
graph export "FigureA7_SM.wmf", as(wmf) replace

